package j03zuoye;
/*
1，最小值
设计一个方法minOfTwoInt, 接收2个整型参数a和b, 返回二者的最小值.
 */
public class J01Min {
    public static void main(String[] args) {
        int min = minOfTwoInt(2,5);
        int min2 = J01Min.minOfTwoInt(20,5);
        System.out.println("min = " + min);//2
        System.out.println("min2 = " + min2);//5

        System.out.println(minOfTwoInt(100,99));//99
    }

    public static int minOfTwoInt(int a,int b) {
        return a<b?a:b;
    }
}
